# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=latte-dock
pkgver=0.10.8
pkgrel=1
# armhf blocked by extra-cmake-modules
# s390x and riscv64 blocked by polkit -> kxmlgui
# ppc64le blocked by plasma-desktop
arch="all !armhf !s390x !ppc64le !riscv64"
url="https://store.kde.org/p/1169519/"
pkgdesc="A dock based on Plasma Frameworks"
license="LGPL-2.0-or-later AND GPL-2.0-or-later"
depends="kactivities"
makedepends="
	extra-cmake-modules
	kactivities-dev
	karchive-dev
	kcoreaddons-dev
	kcrash-dev
	kdbusaddons-dev
	kdeclarative-dev
	kglobalaccel-dev
	kguiaddons-dev
	ki18n-dev
	kiconthemes-dev
	knewstuff-dev
	knotifications-dev
	kwayland-dev
	kwindowsystem-dev
	kxmlgui-dev
	libksysguard-dev
	plasma-framework-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	samurai
	xcb-util-dev
	"
source="https://download.kde.org/stable/latte-dock/latte-dock-$pkgver.tar.xz"
subpackages="$pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
a1148401477d7c2a5123694820443313cd13196a8a2f86815aa89900ac5fb1f8196fc3b99b861ee2c30211071f474965093c0dae42f4b02bb4071c71e8d7bed5  latte-dock-0.10.8.tar.xz
"
